﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.woodsoft.core;
using com.woodsoft.core.Files;

namespace EQ1.Objects {
  public class UITemplateAssoc:UIElement{
    public UITemplateAssoc ( UIDocument doc , string name ) : base( "" , name , "" , doc ) {
    }
    public UITemplateAssoc ( UIDocument doc ) : this( doc , "TemplateAssoc" ) {
    }

    public void Copy ( UITemplateAssoc val ) {
      if( !string.IsNullOrEmpty( val.Name ) )
        this.Name = val.Name;
      if( !string.IsNullOrEmpty( val.Control ) )
        this.Control = val.Control;
    }

    public new string Name {
      get {
        return this.GetElement( "Name" ).InnerText;
      }
      set {
        this.Validate( "Name" , value );
      }
    }
    public string Control {
      get {
        return this.GetElement( "Control" ).InnerText;
      }
      set {
        this.Validate( "Control" , value );
      }
    }
  }
}
